<link rel="stylesheet" type="text/css" href="<?= base_url(); ?>assets/css/admin/stickytooltip.css" />
<script type="text/javascript" src="<?= base_url(); ?>assets/js/admin/stickytooltip.js"></script>
<div class="grid_7">
    <div class="box">
        <h2>
            <a href="#" id="toggle-tables">News Report</a>
        </h2>
        <fieldset> 
            <legend>News List</legend>

            <div style=" margin-bottom: 10px">
                <span style=" float: left; width:10px;" ><strong></strong></span>
                <span style=" float: left; width:110px" ><strong>Posted On</strong></span>
                <span style=" float: left; width:250px"><strong>Title </strong></span>
                <span style=" float: left; width:350px"><strong> Description</strong></span>
                <span style=" float: left; width:10px"><strong></strong></span>
                <span style="width:10px"><strong></strong></span>
            </div>
            <?php foreach ($news as $news) : ?>

                <div style="display: block;margin-bottom: 10px; float: left">
                    <span style="float: left; width:10px" ></span>
                    <span style="float: left; width:110px" ><?= substr($news->date, 0, 12); ?></span>
                    <span style="float: left; width:250px"><?= substr($news->title, 0, 30); ?> 
                        <span id="mystickytooltip" class="stickytooltip">
                            <a href="#"><img src="<?= base_url(); ?>assets/images/sicon.png" alt="Comment" border="0" 
                                             ONMOUSEOVER="ddrivetip('Title:<?= $news->title; ?>')" ONMOUSEOUT="hideddrivetip()"/></a>
                        </span>

                    </span>
                    <span style=" float: left; width:350px"><?= strip_tags(substr($news->description, 0, 50)); ?>
                        <span id="mystickytooltip" class="stickytooltip">
                            <a href="#"><img src="<?= base_url(); ?>assets/images/sicon.png" alt="Comment" border="0" 
                                             ONMOUSEOVER="ddrivetip('Description:<?= $news->description; ?>')" ONMOUSEOUT="hideddrivetip()"/></a>
                        </span>

                    </span>
                    <span style="float: left; width:10px"></span>
                    <span style=" width:10px"></span>
                </div>
                <div style="float:right;margin-bottom: 10px;">
                    <a href="<?= base_url(); ?>admin/reports/delete_news/<?= $news->id; ?>/<?= $news->status; ?>" class="link-button" onclick="return confirm('Are you sure you want to Delete?')">Delete </a></span> 
                </div>
            <?php endforeach; ?>
        </fieldset>    
        <div class="pagination" align="left"> <?php echo $this->pagination->create_links(); ?>  </div>
    </div>
</div>